﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TraceThisItem.Domain;

namespace TraceThisItem.WebUI.ItemTypes
{
    public partial class Default : System.Web.UI.Page
    {
        private string ProjectId;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["projectId"] != null)
            {
                
                this.ProjectId = Request.QueryString["projectId"];
                
            }
        }

        protected void ItemTypesDataSource_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
        {
            e.ObjectInstance = Facade.Instance;
        }

        protected void btnAgregarNuevoTipoDeItem_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/ItemTypes/Create.aspx?projectId="+this.ProjectId,false);
        }

        protected void ItemTypesDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            e.InputParameters["projectId"] = this.ProjectId;
        }

		protected void ItemTypesGridView_RowCommand(object sender, GridViewCommandEventArgs e)
		{
			
		}
    }
}